<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>把一个数组传给v-bind:class</title>
<!--引入Vue库-->
<script src="vue.js"></script>
<style>
  .style1 {
    font-size: 20px;
    font-weight: bold; 
  }
  .style2 {
    color: blue;
  }
</style>
</head>
<body>
<div id="app" :class="[activeClass, errorClass]">欢迎登录</div>
<script>
var app = new Vue({
  el: '#app',
  data: {
    activeClass: 'style1',
    errorClass: 'style2'
  }
})
</script>
</body>
</html>
